﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;


    class Program
    {
        static void Main(string[] args)
        {
            int numberLineFirst = 0;
            int numberLineSecond = 0;
            int countEqual = 0;
            int countDifferent = 0;

            using (StreamReader fileFirst = new StreamReader("fileFirst.txt", Encoding.GetEncoding("UTF-8")))
            {
                string lineFirst = fileFirst.ReadLine();
                using (StreamReader fileSecond = new StreamReader("fileSecond.txt", Encoding.GetEncoding("UTF-8")))
                {
                    string lineSecond = fileSecond.ReadLine();
                    while (lineFirst != null && lineSecond != null)
                    {
                        numberLineFirst++;
                        numberLineSecond++;
                        if (lineFirst.CompareTo(lineSecond) == 0)
                        {
                            countEqual++;
                        }
                        else
                        {
                            countDifferent++;
                        }
                        lineFirst = fileFirst.ReadLine();
                        lineSecond = fileSecond.ReadLine();
                    }
                    Console.WriteLine(countEqual);
                    Console.WriteLine(countDifferent);
                }
            }
        }
    }

